package com.spzx.channel.controller;

import com.spzx.channel.service.IndexService;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Haoran Sun
 * @since 2024/07/23
 */

@Tag(name = "首页管理")
@RestController
@RequestMapping(value = "/index")
public class IndexController {

    @Resource
    private IndexService indexService;

    @GetMapping
    @Operation(summary = "获取首页数据")
    public AjaxResult getIndexData() {
        return AjaxResult.success(indexService.getIndexData());
    }
}
